package cn.gov.pbc.tims.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.gov.pbc.tims.dao.UserDao;
import cn.gov.pbc.tims.entity.User;

@Service("UserService")
public class UserService {
	
	@Autowired
	private UserDao UserDao;
	
	public User load(Integer id){
		return UserDao.load(id);
	}
	
	public User get(Integer id){
		return UserDao.get(id);
	}
	
	public List<User> findAll(){
		return UserDao.findAll();
	}
	
	public List<User> find(String hql, Object[] values){
		return UserDao.find(hql, values);
	}
	
	public void persist(User entity){
		UserDao.persist(entity);
	}
	
	public Integer save(User entity){
		return UserDao.save(entity);
	}
	
	public void saveOrUpdate(User entity){
		UserDao.saveOrUpdate(entity);
	}
	
	public void delete(User entity){
		UserDao.delete(entity);
	}
	
	public void flush(){
		UserDao.flush();
	}

}
